/*
 * @Description: 阶乘
 * @Author: zzj
 * @Date: 2021-09-02 11:29:44
 * @LastEditors: zzj
 * @LastEditTime: 2021-09-02 11:40:01
 */

//阶乘
//3!= 3*2*1
const readline = require("readline-sync");
var n = readline.question("请输入一个数字：")
var res = 1;
var str = "";
for(var i=n;i>0;i--){
    res *= i;
    if(i !==1){
        str += i +"*";
    }else{
        str +=i;
    }
}
console.log(n+"!="+str+"="+res)